-
Notifications
You must be signed in to change notification settings - Fork 87
[GuideLLM Refactor] scheduler package updates, rewrites, and tests expansion #354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a comprehensive refactor of the scheduler package to support distributed benchmarking with a flexible constraint system and enhanced timing control. The implementation moves from hardcoded execution limits to a composable constraint architecture and changes request timing calculations from precalculated to per-request basis for dynamic rate adjustments.
Key changes:
- Added a flexible constraints system with Protocol-based architecture supporting request limits, duration limits, and error thresholds
- Refactored core scheduler objects to be fully generic and decoupled from backend-specific types
- Enhanced scheduling strategies with per-worker timing instances instead of precalculated schedules
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tests/unit/scheduler/test_worker_group.py | Comprehensive test coverage for WorkerProcessGroup multi-process orchestration |
tests/unit/scheduler/test_worker.py | Full test suite for WorkerProcess individual worker functionality |
tests/unit/scheduler/test_strategy.py | Extensive testing of scheduling strategies and timing implementations |
tests/unit/scheduler/test_scheduler.py | Core scheduler singleton testing with distributed coordination |
tests/unit/scheduler/test_objects.py | Complete test coverage for scheduler objects and type relationships |
tests/unit/scheduler/test_environment.py | Testing of environment abstractions for distributed coordination |
tests/unit/scheduler/test_constraints.py | Comprehensive constraint system testing with factory patterns |
src/guidellm/scheduler/worker_group.py | Multi-process worker orchestration implementation |
src/guidellm/scheduler/worker.py | Individual worker process management implementation |
src/guidellm/scheduler/strategy.py | Request scheduling strategies with timing abstractions |
src/guidellm/scheduler/scheduler.py | Thread-safe singleton scheduler for distributed coordination |
src/guidellm/scheduler/result.py | File removed as functionality moved to objects.py |
src/guidellm/scheduler/queues.py | File removed as functionality integrated into worker components |
Comments suppressed due to low confidence (2)
tests/unit/scheduler/test_objects.py:1
- This test expects TypeError but ScheduledRequestInfo has Field defaults defined for all required fields. The test should either provide invalid field types or check for ValidationError instead.
from __future__ import annotations
tests/unit/scheduler/test_objects.py:1
- The field name
created_at
doesn't exist in ScheduledRequestInfo. This should bescheduler_start_time
based on the model definition.
from __future__ import annotations
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
8597abc
to
2d94201
Compare
Signed-off-by: Mark Kurtz <[email protected]>
…view Signed-off-by: Mark Kurtz <[email protected]>
2d94201
to
a7ae737
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only lightly reviewed but LGTM
…o features/refactor/base-draft [GuideLLM Refactor] scheduler package updates, rewrites, and tests expansion #354
…pansion \#354\n\nfeatures/refactor/scheduler
Summary
Introduces a comprehensive constraints system and enhanced timing control for the scheduler refactor. The implementation moves from hardcoded execution limits to a flexible, composable constraint system that enables sophisticated benchmark stopping criteria. Additionally, request timing calculations are moved from precalculated to per-request basis, enabling dynamic rate adjustments and better distributed coordination.
Details
constraints.py
): Implements Protocol-based constraint architecture with support for request limits, duration limits, error thresholds, and sliding window error ratesMaxNumberConstraint
: Limits execution based on request countMaxDurationConstraint
: Limits execution based on time durationMaxErrorsConstraint
: Limits execution based on absolute error countMaxErrorRateConstraint
: Limits execution based on sliding window error rateMaxGlobalErrorRateConstraint
: Limits execution based on global error rateConstraintsInitializerFactory
: Registry system for constraint creation and serializationobjects.py
): Replacedresult.py
and expanded capabilitiesBackendInterface
protocol for type-safe backend integrationScheduledRequestInfo
with comprehensive timing and status trackingSchedulerState
for distributed state coordinationSchedulerUpdateAction
for constraint-based control signalsstrategy.py
): Introduced request timing abstractionsScheduledRequestTimings
base class for timing implementationsLastCompletionRequestTimings
: For synchronous and concurrent strategiesNoDelayRequestTimings
: For maximum throughput strategiesConstantRateRequestTimings
: For fixed-rate schedulingPoissonRateRequestTimings
: For stochastic request patternsenvironment.py
): Coordination layer for distributed executionEnvironment
protocol for distributed synchronizationNonDistributedEnvironment
implementation for single-node executionworker.py
,worker_group.py
): Distributed request processing infrastructureTest Plan
Related Issues
Use of AI
## WRITTEN BY AI ##
)